home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / std / c / 386 < prev    next >
Text File  |  1996-08-06  |  2KB  |  46 lines

  1. Path: sun001.spd.dsccc.com!spd!jmccarty
  2. From: jmccarty@spd.dsccc.com (Mike McCarty)
  3. Newsgroups: comp.lang.c,comp.std.c
  4. Subject: Re: Integral conversion e.t.c. (was: Re: Hungarian notation)
  5. Date: 14 Feb 1996 19:45:21 GMT
  6. Organization: DSC Communications Corporation, Plano, Texas USA
  7. Message-ID: <4fte4h$b36@sun001.spd.dsccc.com>
  8. References: <30C40F77.53B5@swsbbs.com> <SPENCER.96Jan22113215@zorgon.ERA.COM> <KANZE.96Feb2133347@slsvewt.lts.sel.alcatel.de> <4fqfgg$m3u@atusks02.aut.alcatel.at>
  9. NNTP-Posting-Host: aplo139.spd.dsccc.com
  10.  
  11. In article <4fqfgg$m3u@atusks02.aut.alcatel.at>,
  12. Marino Ladavac <ladavac@aut.alcatel.at> wrote:
  13. )James Kanze US/ESC 60/3/141 #40763 (kanze@lts.sel.alcatel.de) wrote:
  14. ): In article <DM3wEy.FHH@mv.mv.com> ENGR@GSSI.MV.COM (Michael Furman)
  15. ): writes:
  16. )
  17. ): In fact, according to the standard, undefined behavior is just that:
  18. ): undefined.  The standard makes no constraints.  In real life, of
  19. ): course, implementations will behave in a somewhat more restricted
  20. ): manner.  Thus, for example, I think it is safe to say that on no real
  21. ): implementation will "i = i ++" actually reformat your disk (although
  22. ): the probablity of it doing what you want is significantly less than
  23. ): 1).  The standard does not try and determine exactly what might really
  24. ): happen in each distinct case of undefined behavior, however.
  25. )
  26. )Well, one cannot really safely say that "i = i++" will or will not
  27. )have catastrophic consequences as the offending line is usually not in
  28. )isolation.  For instance, if the "offender" were a part of the, let's
  29. )say, OS filing system code, anything could happen.
  30. )
  31. )/Alby
  32.  
  33. Let's not overlook malicious compiler writers. Rumor has it that a
  34. certain compiler writer (who shall remain nameless, but who supposedly
  35. has associations with something which might be called FSF) decided that
  36. he did not like the fact that "#pragma" as described by ANSI was allowed
  37. to do whatever the compiler writer liked. So he made all "#pragma"s jump
  38. to a subroutine in the compiler to run the Towers of Hanoi puzzle, and
  39. not output any code. Supposedly, later, that was removed.
  40.  
  41. Mike
  42. ----
  43. char *p="char *p=%c%s%c;main(){printf(p,34,p,34);}";main(){printf(p,34,p,34);}
  44.  
  45. I don't speak for DSC.         <- They make me say that.
  46.